# Disponivel no pacote de programas como: DAG.py
import networkx as NX

G = NX.Graph()
G.add_edges_from([('W','Z'),('Z','Y'),('Y','X'),('X','Z')])

NX.convert_to_directed(G)
NX.write_dot(G,'dag.dot')